Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_osm() not working with newer tmap/tmaptools #19

Closed
zross opened this issue Jan 17, 2020 · 6 comments
Closed

read_osm() not working with newer tmap/tmaptools #19

zross opened this issue Jan 17, 2020 · 6 comments

Comments

@zross
Copy link

zross commented Jan 17, 2020

Hi Martijn, I have a lot of fun using read_osm() with a static map. I'm seeing that this is working for me with {tmap} 2.1 and {tmaptools} 2.0 but not for the most recent versions (tmap, 2.3-1 and tmaptools 2.0-2).

I'm seeing this stackoverflow issue where someone else has reported it.

Any idea what's happening?

# works with 2.1 and 2.0 but not with 2.3-1 and 2.0-2
data("NLD_muni")
osmtiles <- tmaptools::read_osm(NLD_muni)
tm_shape(osmtiles) + tm_raster()
# Error in FUN(X[[i]], ...) : 
#  Sorry, parameter type `NA' is ambiguous or not supported.
@zross
Copy link
Author

zross commented Jan 24, 2020

@mtennekes I'm about to teach tmap/tmap tools -- the read_osm() is not in the actual exercises but I do show it in a slide. Do you recommend I use 2.1 and 2.0 for the workshop for now?

@mtennekes
Copy link
Member

It is working with the latest version (3.0). Not sure it was a bug or something else.
I just merged the 3.0/stars branch with the master.

Plan is to release 3.0 soon on CRAN.

@zross
Copy link
Author

zross commented Feb 24, 2020

Great! Thank you.

@mbacou
Copy link

mbacou commented Apr 9, 2020

Tested with 3.0 (and OpenStreetMap 0.3.4), but I'm still getting errors:

read_osm(bb(xlim=33+c(-1,1), ylim=3+c(-1,1)), type="osm-bw")

java.lang.NullPointerException
	at edu.cens.spatial.RTileController.getTileValues(RTileController.java:109)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at RJavaTools.invokeMethod(RJavaTools.java:386)
Error in osmtile(x%%nX, y, zoom, type) : could not obtain tile: 301 250 9

@mtennekes
Copy link
Member

This is an OpenStreetMap issue. The underlying function that read_osm calls is

openmap(upperLeft = c(4, 32), lowerRight = c(2, 34), type = "osm-bw")

which throws the same error.

@mbacou
Copy link

mbacou commented Apr 9, 2020

Yes I noticed, is this package still maintained? Shall I report it upstream?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants